1. Field of the Invention
The invention relates to an information processing apparatus and an information processing method for communicating with a printer under a print environment where a hard reset signal cannot be issued through a predetermined communication medium for software operating on the OS and transmitting and controlling print data and relates to a computer-readable storage medium which stores a program for controlling such an apparatus.
2. Related Background Art
Hitherto, a reset signal line is generally prepared for a Centronics interface for connecting a serial printer such as an ink jet printer and a computer and the printer can be reset in a hardware manner by turning on/off a reset signal. In the USB (Universal Serial Bus) or IEEE1394, a function to initialize a device exists at a protocol command level, and the printer can be reset in a hardware manner by outputting a reset command as a system.
Particularly, under an environment using Windows95(trade name of Microsoft Co., Ltd. in U.S.A.) as an OS of a computer, if the user wants to stop the printing during the printing, a reset signal or a reset command is issued from utility software or the like to the OS and the printer is forcedly reset by using the reset signal or reset command. In this instance, if the printing is being performed, a paper is forcedly ejected and all of values which have been set so far in the printer are also returned to initial values. The next printing, therefore, can be normally monitored by such an initializing process.
In the recent OS such as WindowsNT (trade name of Microsoft Co., Ltd. in U.S.A.) or the future Windows2000, the OS has an environment where a plurality of users share a computer, there is a danger such that if the reset signal is unnecessarily turned on/off by the user or the output of the reset command is permitted, a printing process of the other person is stopped, and the like. Therefore, for the software which operates on the OS, the use of the reset signal is inhibited, thereby disabling the user to use it.
Therefore, under such an OS environment, if the user wants to stop the printing during the printing by a serial printer which is locally connected via a Centronics I/F, USB, or the like, in order to delete the data remaining in the printer on the halfway of the printing and to reset the print set items (output mode setting such as normal paper output mode, photograph mode, or the like) in the print job, a power supply of the printer apparatus main body has to be turned on/off by the user.
Under the OS environment where no reset signal cannot be issued as mentioned above, the power supply of the printer apparatus main body has to be turned on or off like a conventional manner. That is, in this instance, since there is a possibility that the printer is waiting for reception of continuance of the unfinished command, if the user has already instructed the next print job to print, the head portion of the next print data is mistaken as a continuance of the next print job and performs an unnecessary trash printing. Or, even if the command has been finished, since a form feed command is not received, the paper is not ejected but the next printing is started on the halfway of the paper.
Since an initializing process is insufficient, the values set in the printer are not initialized due to the print data whose printing was stopped, so that those set values are taken over for the next print data. There is, consequently, a situation such that a printing process for a normal paper is performed to an expensive glossy paper and a desired picture quality cannot be obtained.
The invention is made to solve the foregoing problems and it is an object of the invention to provide an information processing apparatus and an information processing method in which even under an environment where when print data is parsed and transmission data is generated, if a print stop command is detected, optimum complementary data is generated in accordance with delimiter information of the transmission data, and the complementary data is transmitted to a printer subsequently to the transmission data, so that a reset signal cannot be issued, a print stop can be realized from a host computer for the print data on the halfway of the printing in the printer, and it is possible to prevent an inconvenience such that when a print stopping process of the print data is performed to the printer in which print set values which are used are set every print data, the previous set values are taken over for the next print data, and to provide a computer-readable storage medium which stores a program for controlling such an apparatus.
According to a first aspect of the present invention, there is provided an information processing apparatus for communicating with a printer and transmitting print data under a print environment where a hard reset signal cannot be issued through a predetermined communication medium for software which operates on the OS, comprising: detecting means (data transmission controller 5 shown in FIG. 1) for, when print data which is generated on the basis of a drawing command is divided on a predetermined unit basis and transmitted to the printer, parsing the divided print data and detecting delimiter information of block data which is transmitted; and complementary data generating means (data transmission controller 5 shown in FIG. 1) for, when a print stop command is issued, finishing the block data to be transmitted on the basis of the delimiter information which is detected by the detecting means and generating complementary data to normally finish a printing process of the printer.
According to a second aspect of the present invention, the information processing apparatus further has print data generating means (print data generator 3 shown in FIG. 1) for receiving the drawing command through the OS and generating the print data comprising commands which can be interpreted by the printer on the basis of the drawing command.
According to a third aspect of the present invention, the information processing apparatus further has transmission processing means (data transmission processor 6 shown in FIG. 1) for transmitting the complementary data generated by the complementary data generating means subsequently to the block data.
According to a fourth aspect of the present invention, in the information processing apparatus, the complementary data generating means further has discriminating means for discriminating whether the block data has normally been finished or not on the basis of the delimiter information which is detected by the detecting means, and when it is determined by the discriminating means that the block data is not normally finished, the complementary data generating means generates the complementary data.
According to a fifth aspect of the present invention, in the information processing apparatus, when the discriminating means determines that the block data lack in parameters, the complementary data generating means generates the necessary number of parameters and a paper ejection command.
According to a sixth aspect of the present invention, in the information processing apparatus, when the discriminating means determines that the block data lack in a command ID and parameters, the complementary data generating means generates a predetermined command which is not interpreted by the printer, parameters, and a paper ejection command.
According to a seventh aspect of the present invention, in the information processing apparatus, the complementary data generating means further generates an initializing command for setting the printing.
According to an eighth aspect of the present invention, in the information processing apparatus, the print data generating means is a printer driver, and the detecting means and the complementary data generating means are a language monitor.
According to a ninth aspect of the present invention, there is provided an information processing method of communicating with a printer and transmitting and controlling print data under a print environment where a hard reset signal cannot be issued through a predetermined communication medium for software which operates on the OS, comprising: a detecting step (step S4 shown in FIG. 5) of, when print data which is generated on the basis of a drawing command is divided on a predetermined unit basis and transmitted to the printer, parsing the divided print data and detecting delimiter information of block data which is transmitted; and a complementary data generating step (step S11 shown in FIG. 5) of, when a print stop command is issued, finishing the block data to be transmitted on the basis of the delimiter information which is detected in the detecting step and generating complementary data to normally finish a printing process of the printer.
According to a tenth aspect of the present invention, the information processing method further has a print data generating step (not shown) of receiving the drawing command through the OS and generating the print data comprising commands which can be interpreted by the printer on the basis of the drawing command.
According to an eleventh aspect of the present invention, the information processing method further has a transmission processing step (step S12 shown in FIG. 5) of transmitting the complementary data generated in the complementary data generating step subsequently to the block data.
According to a twelfth aspect of the present invention, in the information processing method, the complementary data generating step further has a discriminating step (step S5 shown in FIG. 5) of discriminating whether the block data has normally been finished or not on the basis of the delimiter information which is detected in the detecting step, and when it is determined in the discriminating step that the block data is not normally finished, the complementary data is generated in the complementary data generating step.
According to a thirteenth aspect of the present invention, in the information processing method, when it is determined in the discriminating step that the block data lack in parameters, the necessary number of parameters and a paper ejection command are generated in the complementary data generating step.
According to a fourteenth aspect of the present invention, in the information processing method, when it is determined in the discriminating step that the block data lack in a command ID and parameters, a predetermined command which is not interpreted by the printer, parameters, and a paper ejection command are generated in the complementary data generating step.
According to a fifteenth aspect of the present invention, in the information processing method, an initializing command for setting the printing is further generated in the complementary data generating step.
According to a sixteenth aspect of the present invention, in the information processing method, the print data generating step is a printer driver, and the detecting step and the complementary data generating step are a language monitor.
According to a seventeenth aspect of the present invention, there is provided a computer-readable storage medium which stores a program for controlling an information processing apparatus for communicating with a printer and transmitting and controlling print data under a print environment where a hard reset signal cannot be issued through a predetermined communication medium for software which operates on the OS, wherein the program comprises: a detecting step (step S5 shown in FIG. 5) of, when print data which is generated on the basis of a drawing command is divided on a predetermined unit basis and transmitted to the printer, parsing the divided print data and detecting delimiter information of block data which is transmitted; and a complementary data generating step (step S11 shown in FIG. 5) of, when a print stop command is issued, finishing the block data to be transmitted on the basis of the delimiter information which is detected in the detecting step and generating complementary data to normally finish a printing process of the printer.
According to an eighteenth aspect of the present invention, the program in the storage medium further has a print data generating step (not shown) of receiving the drawing command through the OS and generating the print data comprising commands which can be interpreted by the printer on the basis of the drawing command.
According to a nineteenth aspect of the present invention, the program in the storage medium further has a transmission processing step (step S12 shown in FIG. 5) of transmitting the complementary data generated in the complementary data generating step subsequently to the block data.
According to a twentieth aspect of the present invention, in the program in the storage medium, the complementary data generating step further has a discriminating step (step S5 shown in FIG. 5) of discriminating whether the block data has normally been finished or not on the basis of the delimiter information which is detected in the detecting step, and when it is determined in the discriminating step that the block data is not normally finished, the complementary data is generated in the complementary data generating step.
According to a twenty-first aspect of the present invention, in the program in the storage medium, when it is determined in the discriminating step that the block data lack in parameters, the necessary number of parameters and a paper ejection command are generated in the complementary data generating step.
According to a twenty-second aspect of the present invention, in the program in the storage medium, when it is determined in the discriminating step that the block data lack in a command ID and parameters, a predetermined command which is not interpreted by the printer, parameters, and a paper ejection command are generated in the complementary data generating step.
According to a twenty-third aspect of the present invention, in the program in the storage medium, in the complementary data generating step, an initializing command for setting the printing is further generated.
According to a twenty-forth aspect of the present invention, in the program in the storage medium, the print data generating step is a printer driver, and the detecting step and the complementary data generating step are a language monitor.